Method and apparatus for generating images

ABSTRACT

There is provided a method and apparatus for generating an image which make it possible to prepare texture images of normal brightness and to generate a texture-mapped image as an image brighter than the original texture images. 
     In a system for mapping texture images prepared in advance onto polygonal areas obtained by a drawing process with brightness calculated for each of the polygonal areas, a brightness level lower than the maximum brightness level that can be rendered by the system is used as the maximum brightness level of the texture image prepared in advance, and the rendering of brightness during the mapping of the texture images onto the polygonal areas can be performed with brightness higher than the original brightness of the texture images.

This application is a continuation of application Ser. No. 08/417,123,filed Apr. 5, 1995, now U.S. Pat. No. 05,259,672.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image generation apparatus whichgenerates an image, for example, in an three-dimensional graphic system,by mapping images which have been prepared in advance (texture images)onto polygons generated by a drawing operation with a brightnesscalculated for each polygon.

2. Description of the Related Art

In a three-dimensional graphic system, for example, an object isdisplayed as an aggregate of a multiplicity of polygons, and each of thepolygons can be modified by a texture image prepared in advance. Suchmodification of polygons is achieved by performing a process calledtexture mapping in which texture images are applied to polygons. Duringsuch texture mapping, in order to give the displayed object athree-dimensional appearance, a so-called shading process is carried outin which the position of a virtual light source is set and each polygonis shaded in relation to the light source. Such shading is carried outby assigning a shading constant K=1 (i.e., the brightness of theoriginal texture image) to the brightness of the polygon in the positionwhere the highest brightness is obtained from the virtual light sourceand by setting the shading factors K for polygons darker than that tovalues which are smalller than 1 and which depend on how dark they are.

Conventionally, texture images prepared for texture mapping have beenrendered using the entire dynamic range for representing the brightnessof the image display device. As a result, the brightness of polygons canbe set only in the direction in which it is reduced during texturemapping. Accordingly, it has not been possible to perform texturemapping so that texture images are mapped with a brightness higher thanthat of the original color thereof.

Therefore, considering the necessity to render an image with abrightness higher than the original normal brightness as encountered inrendering the scene of an explosion, it has been necessary to preparetexture images with a higher brightness than the normal brightness. Animage having a normal appearance (image having a normal brightness) hasbeen generated by mapping texture images of a higher brightness asdescribed above so that the brightness is reduced.

The applicant has made the following Japanese patent applications whichare related to the drawing device according to this application.

05-190763 (filed on Jun. 30, 1993)

05-190764 (filed on Jul. 2, 1993)

05-258625 (filed on Oct. 15, 1993)

06-027405 (filed on Jan. 31, 1994)

Each of the above applications is owned by the assignee of the presentinvention and is hereby incorporated by reference. (Applications forU.S. patent corresponding to these four Japanese patent applications arepending.)

As described above, for conventional texture mapping, texture imageshaving a brightness higher than a normal brightness are created inadvance in order to render an image with an increased brightness.Therefore, it is not possible to create texture images having a normalappearance. This has resulted in a difficulty in creating textureimages. There is another problem in that the creation of texture imagestakes a long time.

For example, an image having a normal brightness created using texturemapping is generated by reducing the brightness of the texture images ofa higher brightness prepared in advance. This makes it difficult torender an image with a natural normal brightness because such a processrenders even an image having a normal brightness with a darkerappearance.

The present invention confronts the above-described problem, and it isan object of the present invention to provide a method and apparatus forgenerating an image which make it possible to prepare texture images ofa normal brightness and to generate a texture-mapped image as an imagebrighter than the original texture images.

SUMMARY OF THE INVENTION

In order to solve the above-described problem, according to the presentinvention, there is provided a method of generating an image in a systemfor mapping texture images prepared in advance onto polygonal areasobtained by a drawing process with a brightness calculated for each ofthe polygonal areas, wherein a brightness level lower than the maximumbrightness level that can be rendered by the system is used as themaximum brightness level of the texture image prepared in advance andwherein brightness rendering during the mapping of the texture imagesonto the polygonal areas can be performed with a brightness higher thanthe original brightness of the texture images.

Further, according to the present invention, there is provided an imagegeneration apparatus for mapping texture images prepared in advance ontopolygonal areas obtained by a drawing process with a brightnesscalculated for each of the polygonal areas, including a first mappingmeans for performing the mapping so that a brightness level M lower thanthe maximum brightness level that can be rendered is used as the maximumbrightness level that can be rendered using the texture images and asecond mapping means for mapping the texture images so that they can berendered at a brightness level higher than the brightness level M.

According to the present invention having the above-describedconfiguration, the maximum brightness level of the texture imagesprepared for texture mapping is set to a brightness level lower than themaximum brightness level that can be rendered by the system forperforming the texture mapping. As a result, it is possible to renderimages having a brightness equal to or lower than the brightness of theoriginal color of the prepared texture images using the dynamic range ofa brightness equal to or lower than the above-described low brightnesslevel.

Images brighter than the prepared texture images can be rendered with abrightness that lies between the maximum brightness level that can berendered by the system and the above-described lower brightness level.

Since images brighter than the prepared texture images can be thusrendered, the texture images may be prepared with a normal brightnessthat gives a natural appearance. Further, since images brighter than theprepared texture images can be easily obtained, patterns of explosionsand so-called whitened images appearing on game machines and the likecan be easily generated from prepared texture images having a normalappearance.

As described above, according to the present invention, images formedusing texture mapping can be rendered with a brightness higher than thatof the original color of texture images prepared in advance. This makesit possible to cause images formed using texture mapping to flash and toobtain the so-called whitening effect.

Further, since it is not necessary to create the texture images preparedin advance with the highest possible brightness unlike the prior art,the texture images can be created to have a normal appearance. As aresult, the burden of the creation of application programs can bereduced, and texture-mapped images can be rendered with naturalappearance without unnaturalness such as a too dark tone.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an embodiment of a major part of an imagegeneration apparatus according to the present invention.

FIG. 2 illustrates an embodiment of a method of generating imagesaccording to the present invention.

FIG. 3 including FIGS. 3A-3C illustrates an operation of the embodimentshown in FIG. 1.

FIG. 4 is a block diagram illustrating an image generation apparatusaccording to the present invention as a whole.

FIG. 5 illustrates a memory area of a frame memory in an embodiment ofan image generation apparatus according to the present invention.

FIG. 6 shows an example of a polygon draw command in an embodiment of animage generation apparatus according to the present invention.

FIG. 7 illustrates the order in which polygons are draft and displayedin an embodiment of an image generation apparatus according to thepresent invention.

FIG. 8 illustrates texture mapping.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

An embodiment of the present invention will now be described withreference to the accompanying drawings. FIG. 4 shows an example of aconfiguration of an image generation apparatus according to anembodiment of the present invention. This is an example theimplementation of the invention in a game machine having a 3D graphicfunction and a dynamic image reproducing function.

In FIG. 4, 41 designates a system bus (main bus). A CPU 42, a mainmemory 43, and a sorting controller 45 are connected to the system bus41.

An image decompression device portion 51 is also connected to the systembus 41 through an FIFO buffer memory 54 for input (hereinafter the FIFObuffer memory is simply referred to as an FIFO buffer) and an FIFObuffer 55 for output. Further, a CD-ROM decoder 52 and a drawing deviceportion 61 are also connected to the system bus 41 through an FIFObuffer 56 and an FIFO buffer 62, respectively.

71 designates a control pad 71 as a control input means which is alsoconnected to the system bus 41 through an interface 72. In addition, aboot ROM 73 is connected to the system bus 41 in which a program forstarting up the game machine is stored.

The CO-ROM decoder 52 is connected to a CD-ROM driver 53 and decodes anapplication program (e.g., the program of a game) and data recorded on aCD-ROM disc loaded in the CD-ROM driver 53. For example, a CD-ROM discstores image data for dynamic images and still images which have beensubjected to image compression using discrete cosine transformation(DCT) and image data for texture images for modifying polygons. Theapplication program in the CD-ROM disc includes polygon draw commands.The FIFO buffer 56 has a capacity to store one sector of the datarecorded on the CD-ROM disc.

The CPU 42 manages the system as a whole. The CPU 42 also performs apart of a process of drawing an object as an aggregate of a multiplicityof polygons. Specifically, the CPU 42 generates a string of drawcommands for generating images which constitute one screen on the mainmemory 43, as described later.

The CPU 42 includes a cache memory 46 which allows some of CPUinstructions to be executed without fetching them over the system bus41. Further, the CPU 42 is equipped with a coordinate calculatingportion 44, as an internal coprocessor of the CPU, which performscalculations for converting the coordinates of polygons when drawcommands are created. The coordinate calculating portion 44 performscalculations for three-dimensional coordinate conversion and conversionof three dimensions into two dimensions on a display screen.

Since the CPU 42 incorporates the command cache 46 and the coordinatecalculating portion 44 as described above, the processes in the CPU 42can be performed without using the system bus 41 to some extent, andthis increases opportunities to leave the system bus 41 unoccupied.

The image decompression device portion 51 decompresses compressed imagedata reproduced from a CD-ROM disc and includes hardware for a decoderfor decoding Huffman codes, an inverse quantization circuit, and aninverse discrete cosine transformation circuit. The process at the partof the Huffman code decoder may be performed by the CPU 42 on a softwarebasis.

In this embodiment, the image decompression device portion 51 dividesone (one frame of) image into small areas each consisting of, forexample, 16×16 pixels (hereinafter such an area is referred to as amacro-block) and performs image-decompression-decoding on eachmacro-block. Data is transferred between this portion and the mainmemory 43 on a macro-block basis. Therefore, the FIFO buffers 54 and 55have a capacity to store one macro-block.

A frame memory 63 is connected to the drawing device portion 61 througha local bus 11. The drawing device portion 61 executes draw commandstransferred thereto from the main memory 43 through the FIFO buffer 62and writes the result in the frame memory 63. The FIFO buffer 62 has amemory capacity to store one draw command.

The frame memory 63 includes an image memory area for storing drawnimages, a texture area for storing texture images, and a table memoryarea for storing a color look-up table (or color conversion table) CLUT.

FIG. 5 shows the memory space of the frame memory 63. The frame memoryis addressed using two-dimensional addresses, i.e., column and rowaddresses. In this two-dimensional address space, an area AT is used asthe texture area. Plural kinds of texture patterns can be provided inthis texture area AT. AC represents the table memory area for the colorconversion table CLUT.

As described later in detail, the data in the color conversion tableCLUT is transferred by the sorting controller 45 from the CD-ROM disc tothe frame memory 63 through the CD-ROM decoder 52. The data of thetexture images in the CD-ROM disc is subjected to data-decompression atthe image decompression device portion 51 and is transferred to theframe memory 63 through the main memory 43.

In FIG. 5, AD represents an image memory area which includes two framebuffer areas, i.e., an area for drawing and an area for display. In thisembodiment, the frame buffer area which is currently used for display isreferred to as a display buffer and the area in which drawing is beingperformed is referred to as a drawing buffer. In this case, whiledrawing is performed using one of the areas as a drawing buffer, theother is used as a display buffer. When the drawing is completed, thefunctions of those buffers are switched. The switching of the drawingand display buffers is carried out simultaneously with verticalsynchronization when the drawing is completed.

The image data read from the display buffer of the frame memory 63 isoutput through a D-A converter 64 to an image monitor device 65 to bedisplayed on the screen thereof.

The sorting controller 45 has functions similar to those of theso-called DMS controller and constitutes a transfer means fortransferring image data between the main memory 43 and the imagedecompression device portion 51 and for transferring a string of drawcommands from the main memory 43 to the drawing device portion 61. Thesorting controller 45 performs the above-described transfer processestaking advantage of the time intervals when the system bus 41 is notoccupied by other devices such as the CPU 42 and the control pad 71without intervention of the CPU 42. In this case, an arrangement may bemade such that the CPU 42 notifies a the sorting controller 45 of theunoccupied state of the system bus 41 or such that the sortingcontroller 45 forcibly requests the CPU 42 to free the bus.

In order to store the image data of dynamic images and still images, themain memory 43 includes a memory area for compressed image data and amemory area for decompressed image data which has been subjected todecompression-decoding. The main memory 43 also includes a memory areafor graphics data such as a string of draw commands (such an area ishereinafter referred to as a packet buffer).

The packet buffer is used for the setting of a draw command stringperformed by the CPU 42 and the transfer of the draw command string tothe drawing device portion and is shared by the CPU 42 and the drawingdevice portion 61. In order to allow parallel processing between the CPU42 and the drawing device portion 61, in this embodiment, two packetbuffers, i.e., a packet buffer for setting the draw command string and(hereinafter referred to as a setting packet buffer) and a packet bufferfor transfer (hereinafter referred to as an execution packet buffer),are provided. When one of the buffers is used as the setting packetbuffer, the other is used as the execution packet buffer and, when theexecution using the execution packet buffer is finished, the functionsof the two packet buffers are switched. The process in this device willbe described below.

Data Fetching from CD-ROM Disc!

When the device (game machine) in the embodiment in FIG. 4 is powered upand a CD-ROM disc is loaded, the CPU 42 executes a program for aso-called initialization process in preparation for the execution of thegame in the boot ROM 73. The data recorded on the CD-ROM disc is thenfetched. At this time, decoding of user data is performed based onidentification information ID included in user data in each sector ofthe CD-ROM disc to check the data. Based on the result of this check,the CPU 42 executes processing according to the reproduction data of thecontents indicated by each ID.

Specifically, compressed image data, draw commands, and programs to beexecuted by the CPU 42 are read from the CD-ROM disc through the CD-ROMdriver 53 and the CD-ROM decoder 52 and are loaded in the main memory 43by the sorting controller 45. Among the loaded data, the information ofthe color conversion table is transferred to the area CLUT of the framememory 63.

Decompression and Transfer of Compressed Image Data!

Among the data input to the main memory 43, compressed image data issubjected to Huffman-code-decoding performed by the CPU 42 and,thereafter, is rewritten in the main memory 43 by the CPU 42. Thesorting controller 45 transfers the image data which has been subjectedto the Huffman-code-decoding from the main memory 43 to the imagedecompression device portion 51 through the FIFO buffer 54. The imagedecompression device portion 51 performs a decompress-decoding processon the image data through an inverse quantization process and an inverseDCT process.

The decompressed image data is transferred by the sorting controller 45to the main memory 43 through the FIFO buffer 55. The imagedecompression device portion 51 decompresses the image data on amacro-block basis as described above. As a result, the compressed dataon a macro-block basis is transferred by the sorting controller 45 fromthe main memory 43 to the input FIFO buffer 54. Upon completion ofdecompress-decoding of one macro-block, the image decompression deviceportion 51 inputs the resultant decompressed image data in the FIFObuffer 55 for output and fetches the compressed data of the nextmacro-block from the input FIFO buffer 54 to perform decompress-decodingon it.

If the system bus 41 is unoccupied and the output FIFO buffer 55 of theimage decompression device portion 51 is not empty, the sortingcontroller 45 transfers the decompressed image data for one macro-blockto the main memory 43 and transfers the compressed image data for thenext macro-block from the main memory 43 to the input FIFO buffer 54 ofthe image decompression device 51.

When a predetermined number of macro-blocks of decompressed image datahave been accumulated in the main memory 43, The CPU 42 transfers thedecompressed data to the frame memory 63 through the drawing deviceportion 61. If the decompressed data is transferred to the image memoryarea AD of the frame memory 63, it will be displayed as it is on theimage monitor device 65 as a background dynamic image. Alternatively,the data may be transferred to the texture area AT of the frame memory63. The image data in the texture area AT is used as a texture image formodifying a polygon.

Processing and Transfer of Draw Command String!

Polygons which constitute faces of an object may be drawn in the orderof decreasing depths in accordance with Z data which is information onthree-dimensional depths to display an image having three-dimensionalappearance on a two-dimensional image display surface. The CPU 42creates a string of draw commands on the main memory 43, which causesthe drawing device portion 61 to draw polygons in the order ofdecreasing depths as described above.

In computer graphics the so-called Z buffer method is employed whereinthe priorities for the display of polygons are decided based on Z datastored for each pixel. According to the Z buffer method, however, amemory having a large capacity is required to store the Z data. In orderto solve this, according to this embodiment, the CPU 42 performs theprocess of deciding the priorities for the display of polygons asfollows.

For this purpose, a polygon draw command IP in this embodiment has astructure as shown at A in FIG. 4. Specifically, the polygon drawcommand IP has a header which precedes a polygon drawing data PD. Theheader portion includes a tag TG and a command identification code CODE.

The address on the main memory 43 where the next draw command is storedis written in the tag TAG. The command identification code CODE includesidentification data IDP which identifies the contents of the drawcommand and other information required for the draw command. The polygondrawing data PD is constituted by the data on the coordinates of thevertices of the polygon. If the draw command IP is a command to draw aquadrangular polygon and the inside of the polygon is to be mapped in asingle color, the identification data IDP indicates such and the data ofthe color to be mapped is specified as other necessary information.

An example of a draw command for a quadrangular polygon is shown at B inFIG. 6. This draw command includes the coordinates of four points (X0,Y0), (X1, Y1), (X2, Y2) and (X3, Y3) and the color data of the threeprimary colors (R, G, B) for mapping the inside of the polygon in onecolor.

The CPU 42 calculates the movements of the object and the viewpoint andcreates a string of polygon draw commands on the main memory 43 based oncontrol input from the user via the control pad 71. Then, it rewritesthe tags of the polygon draw commands in accordance with the displayingorder using the Z data. At this time, the addresses of the draw commandson the main memory 43 is not changed, but only the tags are rewritten.

When this draw command string is completed, the sorting controller 45transfers the draw commands one by one from the main memory 43 to thedrawing device portion 61 in an order according to the tags TG of thedraw commands. Therefore, the FIFO buffer 62 only needs to have acapacity to store one draw command.

Since the data transferred to the drawing device portion 61 has alreadybeen sorted, as shown in FIG. 7, the drawing device portion 61sequentially executes the polygon draw commands IP1, TP2, IP3, . . . ,IPn in accordance with the respective tags TG1, TG2, TG3, . . . , TGnand stores the result in the drawing area AD of the frame memory 63.

When a polygon is drawn, data is sent to a gradient calculation unit ofthe drawing device portion 61 for a gradient calculation. A gradientcalculation is a calculation to obtain the gradient of the plane of themapping data for filling the inside of the polygon to be drawn. In thecase of texturing, the polygon is filled with texture image data and, inthe case of glow shading, the polygon is filled with brightness values.

When a polygon that constitutes a face of an object is textured, thetexture data in the texture area AT is subjected to two-dimensionalmapping. For example, texture patterns T1, T2, and T3 as indicated at Ain FIG. 8 are converted into coordinates on a two-dimensional screen sothat they will fit the polygons that constitute respective faces of anobject as shown at B in FIG. 8. As shown at C in FIG. 8, the texturepatterns T1, T2, and T3 thus mapped are applied to the respective facesof the object OB1. The product is placed in the image memory area AD anddisplayed on the display screen of the image display monitor 65.

In the case of still image texturing, texture patterns in the mainmemory 43 are transferred to the texture area AT of the frame memory 63through the drawing device portion 61. The drawing device portion 61applies them to the polygon. This provides still image textures on theobject. The data of such still image texture patterns can be recorded onthe CD-ROM disc.

Further, it is possible to perform dynamic image texturing. In the caseof dynamic image texturing, compressed dynamic image data from a CD-ROMdisc is temporarily read into the main memory 43, as described above.Then, this compressed image data is sent to the image decompressiondevice portion 51 which decompresses the image data. As described above,a part of this decompression process is carried out by the CPU 42.

The decompressed image data is sent to the texture area AT of the framememory 63. Since the texture area AT is provided in the frame memory 63,the texture patterns themselves can be rewritten on a frame-by-framebasis. Thus, when dynamic images are sent to the texture area AT, thetextures dynamically change as a result of the rewriting on aframe-by-frame basis. Texture mapping utilizing these dynamic images inthe texture area will allow texturing with dynamic images.

As described above, by sending the image data decompressed by the imagedecompression device portion 51 to the image memory area AD of the framememory 63, it is possible to display dynamic images as background imageson the screen of the image monitor screen 65 and to fill the imagememory area AD only with the images generated by the CPU 42 to draw animage on the screen of the image display monitor 65. It is also possibleto draw an object utilizing the polygon drawing by the CPU 62 over astill image obtained by decompressing image data from a CD-ROM disc onthe image memory area AD.

Description of Texture Mapping Process!

Next, a description will be made with reference to FIGS. 1-3 on atexture mapping process performed by the frame memory 63 and the drawingdevice portion 61.

In this embodiment, as described above, texture images to be used fortexture mapping are fetched from a CD-ROM disc and are subjected todecompress-decoding. Thereafter, they are written in the texture area ATof the frame memory 63. The images prepared as the texture images have anormal brightness and a normal appearance.

In this embodiment, the mapping the texture images in this texture areaare texture-napped with the original brightness thereof to which ashading factor K=1 is assigned (the brightest part with respect to thevirtual light source) is referred to as a normal mode, and the mappingof the texture images with a brightness higher than the originalbrightness is referred to as a special mode.

As shown in FIG. 2, in this embodiment, the dynamic range for the normalmode is one half the dynamic range for brightness rendering of thesystem as a whole while the dynamic range for the special mode is thesame as the dynamic range for brightness rendering of the system as awhole. In the special mode, therefore, image rendering can be performedwith a brightness higher than that of the texture images prepared in thetexture area AT.

Specifically, in the normal mode, the CPU 42 performs texture mapping inthe one half on the darker side of the dynamic range for brightnessrendering of the system as a whole with the shading factor K1 for thisnormal mode obtained for each polygon within the range expressed by0≦K1≦1.

On the other hand, in the special mode, the shading factor K2 formapping in this mode is set within the range expressed by K2>1 to obtaintexture-mapped images brighter than the original texture images. Forexample, K2 is set equal to 2 for a pattern of explosion.

With such an arrangement, the texture images prepared in advance may bethose having a normal brightness, as described above.

In this case, however, the maximum value of the brightness that can berendered by the original texture images is lower than the maximum valueof the brightness that can be rendered by the system, the former beingone half the latter in this embodiment.

FIG. 1 is a block diagram of a part of the drawing device portion 61which is for the texture mapping process.

In this embodiment, the data for each pixel in a texture image isconstituted by information on the three primary colors (red (R), green(G), and blue (B)) each of which is represented by five bits.

In the drawing device portion 61 shown in FIG. 1, the part for thetexture mapping process is constituted by a mapping data extractionportion 22, a bit conversion portion 22, factor multiplication portions23 and 24, a switching circuit 25, and a switching control porion 26.

The mapping data extraction portion 21 extracts q texture image to beused for the mapping process from among the texture images stored in thetexture area AT and supplies it to the bit conversion portion 22. Asshown at A and B in FIG. 3, the bit conversion portion 22 deletes theleast significant bit of each of the data for three primary colors R(red), G (green), and B (blue) represented by 5 bits of the textureimage data extracted by the mapping data extraction portion 21, therebyconverting them into data for three primary colors R1, G1, and B1 whichare each represented by the four significant bits. The original color ofthe texture image is rendered within a range that is one half thedynamic range of brightness of the image generation apparatus using thedata for three primary colors R1, G1, and B1 each represented by fourbits.

The output of the bit conversion portion 22 is supplied to the factormultiplication portions 23 and 24. The factor multiplication portion 23performs the multiplication of the shading factor K1 in the texturemapping in the normal mode. The factor multiplication portion 24performs the multiplication of the shading factor K2 in the texturemapping in the special mode. As described above, the shading factor K1satisfies 0≦K1≦1. The shading factor K2 satisfies K2>1 and is fixed to 2in the case of a pattern of an explosion.

These factors K1 and K2 are calculated by the CPU 42 for each polygonwith a virtual light source set. They are passed onto the drawing deviceportion 61 to be supplied to the respective factor multiplicationportions 23 and 24.

As shown at C in FIG. 3, the data output by the factor multiplicationportion 23 is added with one "0" bit on the side of the most significantbit of each of the data of three primary colors represented by fourbits. Thus, each of the data of three primary colors is output as fivebits. The data output by the factor multiplication portion 24 ismultiplied by K2. Each of the data of three primary colors is output asfive bits. Specifically, when carries are generated, one "1" bit as acarry is added to the side of most significant bit of each of the dataof three primary colors represented by four bits and, when no carry isgenerated, one "0" bit is added to the side of most significant bit ofeach of the data. In the case of a pattern of an explosion, since K2=2,one "1" bit is added to the side of the most significant bit of each ofthe data of three primary colors represented by four bits. Thus,multiplication by a factor of 2 is performed.

The output of the factor multiplication portions 23 and 24 is suppliedto the circuit 25 for switching between the normal and special modes.The switching circuit 25 is switched by a switching signal from theswitching control portion 26. The switching control portion 26 forms aswitching control signal of the switching circuit 25 based on a modeswitching signal from the CPU 42.

In the case of the normal mode, the switching circuit 25 is switched toan input terminal a. This causes the image data from the factormultiplication portion 23 to be transferred to the image memory area ADof the frame memory 63, thereby causing texture mapping. Since thefactor K1 by which the image data is multiplied at the factormultiplication portion 23 satisfies 0≦K1≦1, the mapping is performedwith a brightness which is equal to or lower than the originalbrightness of the texture image. As a result, the texture mappingprovides natural brightness and appearance.

In the case of the special mode, the switching circuit 25 is switched toan input terminal b. This causes the image data from the factormultiplication portion 24 to be transferred to the image memory area ADof the frame memory 63, thereby causing texture mapping. For example, ifa pattern of an explosion is mapped, K2 is set equal to 2 to map theoriginal texture image with a double brightness.

Thus, according the above-described embodiment, the dynamic range forbrightness rendering during texture mapping in the normal mode is onehalf of the dynamic range for brightness rendering of the system, andthis makes it possible to render a brightness up to twice the brightnessof the original color of the prepared texture image using texturemapping.

Although the dynamic range for brightness rendering during texturemapping in the normal mode is one half of the dynamic range forbrightness rendering of the system in the above-described embodiment,the level of the dynamic range for brightness rendering during texturemapping in the normal mode is not limited to that of the embodiment butit depends on the resolution in the direction of the brightness requiredfor texture mapping in the normal mode (the gradation of the brightness)and the level of the brightness which must be obtained from the preparedtexture image.

Various modifications to the present invention will become apparent tothose skilled in the art from the foregoing description and accompanyingdrawings. Accordingly, the present invention is to be limited solely bythe scope of the following claims.

What is claimed is:
 1. Apparatus for mapping a texture image having aplurality of pixels onto a polygonal area having a dynamic brightnessrange greater than a dynamic brightness range of said texture image withrespect to a virtual light source, wherein a plurality of polygonalareas are displayed on a two-dimensional display with athree-dimensional appearance, said apparatus comprising:means forascertaining a brightness level of each of said pixels of said textureimage with respect to said virtual light source; means for reducing theascertained brightness level of each of said pixels to produce reducedbrightness levels; means for shading said polygonal area onto which saidpixels of said texture image are mapped by multiplying the reducedbrightness levels of said pixels by a shading factor, said shadingfactor being greater than 1 to produce a mapped texture image having adynamic brightness range greater than the dynamic brightness range ofsaid texture image; and coordinate converting means for convertingcoordinates of said plurality of polygonal areas such that saidplurality of polygonal areas are displayed on said two-dimensionaldisplay with said three-dimensional appearance.